import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier

x = pd.read_csv("D:\分类实验2次\\new_titanic.csv", usecols=['Pclass','Sex','Age','SibSp','Parch','Fare','Embarked'])
y = pd.read_csv("D:\分类实验2次\\new_titanic.csv", usecols=['Survived'])
x = np.array(x)
y = np.array(y).flatten()
# print(x.shape)
# print(y.shape)
rf = RandomForestClassifier()
rf = rf.fit(x,y)